

package xpn.business.fund_return.entity.frcase;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import xpn.business.fund_return.entity.frcase.valueobject.CaseStatusCommon;
import xpn.business.fund_return.entity.frcase.valueobject.CaseWriteStatus;
import xpn.platform.modules.persistence.AbstractAuditorEntity;
import xpn.platform.modules.sys.org.SysOrg;
import xpn.platform.modules.sys.user.SysUser;

import javax.persistence.*;


@Entity
@Table(name = "frcase")
@Getter
@Setter
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" }, ignoreUnknown = true)
public class FrCase extends AbstractAuditorEntity {

    private static final long serialVersionUID = -4346041149356015585L;


    /**
     * 案件信息
     */
    @Column(length = 50)
    private String caseCodeCommon;//案件编号
    @Column(length = 100)
    private String caseNameCommon;//案件名称
    @Enumerated(EnumType.STRING)
    private CaseWriteStatus caseWriteStatus;//案件填写状态
    @Column(length = 20)
    @Enumerated(EnumType.STRING)
    private CaseStatusCommon caseStateCommon;//案件状态


    /**
     * 申请表
     */
    private String victimName;//受害人=姓名
    @JoinColumn
    @ManyToOne(fetch = FetchType.LAZY)
    private SysOrg caseHandlingUnit;//立案单位
    @JoinColumn
    @ManyToOne(fetch = FetchType.LAZY)
    private SysUser caseHandlerA;//办案人
    @JoinColumn
    @ManyToOne(fetch = FetchType.LAZY)
    private SysUser caseHandlerB;//办案人
    private String blockingBankAccounts;//被冻结账号
    private String returnAccount;//返还账户


    /**
     * 申请书
     */
    private String caseNature;//案件性质/类别
    private Float refundAmount;//返还金额

    /**
     * 报告书
     */
    private String returnReason;//返还原因/案情简要

}